changed the date format using a new method