new time management

should fix all timing bugs