Corrected calculation of y of square covered