Time Sorting working