date and cost now switch between ascending and descending order