added tree depth