added tree height counter