Tree class method parameters passed by reference