fixing ordering
getting the correct date and in correct order