date handling added