starting to develop the FSM