just trying fsm
just trying refactory