add Mansour Behabadi and Jake Gordon's FSM code