make the time work correctly