Work on State Machine