nit: just to make things more readable, I'd do the math in one variable before getting the size