added optional parent state for StateMachine