Finally added sort-by-date-functionality