changed date from time class to date class