FSM abstraction