almost finishing BTreeIndex constructor