finalized setNextLevel func