FSM Simulation