added method MainTree