added exit by 'escape' and removed faulty resetlLevel function