mgtree method updated