solve the time problem