Added simple Statemachine