Sorting for all data types