Simplified changeState() method. All tests pass.