if($$tree->{left} == undef || $$tree->{right} == undef) { return; }