public BPlusTreeNode getChildNodeForValue(long value) throws MiniDB_Exception{
    int slotID = 0;
    int numValuesOnBlock = getCurrNumRecordsOnBlock();
    BPlusTreeNode childNode = null;
    int childBlockID = -1;

    while( slotID < numValuesOnBlock && childBlockID == -1 ){
      if( getValue(slotID) > value ){
	childBlockID = getBlockID(slotID);
      }
      slotID++;
    }

    if( childBlockID == -1 ){
      slotID = numValuesOnBlock;
      childBlockID = getBlockID(slotID);
    }

    MiniDB_Block blk = bpt.miniDB.bufMgr.pin_block(childBlockID);

    if( blk.getBlockType() == MiniDB_Block.BLOCK_TYPE_BPT_LEAF ){
      boolean isNewNode = false;
      childNode = new BPlusTreeLeafNode(blk,this.bpt,isNewNode);
    }
    else{
      assert( blk.getBlockType() == MiniDB_Block.BLOCK_TYPE_BPT_INTERNAL );
      childNode = new BPlusTreeInternalNode(blk,this.bpt);
    }

    return childNode;
  }