added Tree class