added checking for updated time