Odd way to calculate padding?