Added functionality to change levels