properly creating date object