added statemachine calculator