Added comment around "generateNewState"