got sorting methods working for x and y coords