Sorted the zcoords on the ui