Changed SQUARE to nearestSquare