adding date helper function