sorting of entries by y position