added ability to sort on dates