Added fsm controller