not finite state machine but OF style state machine