changed Main loop, lvl