Enhance State Machine