add hierarchyLevel to layers