added support for hierarical meshes