improve by_time
udpate