new fsm architecture almost working