fixing stateMachine, adding time of day as state