add FSM support to eclib