added date handling