refactoring, xcoordinate to x, ycoordinate to y