technically this will make a zero division error when size = 0. I guess that can't happen but I'd suggest isolating these calculations and adding one unit test