fixed up timers and StateMachine