statemachine base class

add three statemachine base class