add maximum depth tree