1. refactored TransitionMatrix
2. starting implementation of FSM(implemented transition)