changes for calculating height of tree