working on x and y cordinates