more on loop workaround
better handling of level