State Machine Apparently Working