statemachine defined
state machine woot!