added sort functionality for date and alphabets