no need to sort by XY value now. If you want to do it simply set latitude as sortKey

cleanup that goes with it