Added 10ms loop for statemachines