add tree creation, full testing through generating simulating tree and compare with original