changing states with inputs works
more robust sub-fsm