rebuild trees