edited setNextLevel func