moving some btree logic to bnode