add statemachine