cleanup
sort by x coordinate