timing calculations fixed