mtree basic algorithm explanation