changed calculation of times