updated the date method