code refactored
reset dates