updated the fnction date