Added code to change levels