A state machine hierarchy with steering functionality