iterative solutions for btree depth needed