add a constructor for tree node