*Complete FSM(finite state Machine)