timestamp logic change