remove dependency of result of calculateLevels in renderXML