adjust time calculation