updated working with dates