sorting by date is working