add maxlvloftree method