made adjustments throught to use/handle datetime