clever use of sorting eh