adjusted the coordinates to the center