public boolean addRecord(long value, int blockID){
    //System.out.println( "addRecord() " + value + ", " + blockID );
    boolean success = false;

    if( !isLeafNode() ){
      //System.out.println( "Adding record to internal node! " );
      //System.out.println( "addRecord() " + value + ", " + blockID );
      //System.out.println( summaryToString() );
      //MiniDB_Constants.waitHere();
    }

    if( hasRoomForAnotherRecord() ){
      int slotID = getSlotForValue( value );
      int numRecsOnBlock = getCurrNumRecordsOnBlock();

      //System.out.println( "now\n" + toString() );
      //System.out.println( "Inserting into slot " + slotID );
      //System.out.println( "current value in slot is " + getValue(slotID) );
      //System.out.println( "numRecsOnBlock is " + numRecsOnBlock );
      if( (getValue(slotID) != value) && (slotID < numRecsOnBlock) && (numRecsOnBlock > 0) ) {
	//System.out.println( "Shifting" );
	//MiniDB_Util.waitHere("");
	// shift slots >=  slotID since we are inserting a new record 
	// (not changing the value of an existing record)

	//System.arraycopy( this.buffer, offset_slot(slotID), this.buffer, offset_slot(slotID+1), szToShift);
	int srcOffset;
	int destOffset;

	if( isLeafNode() ){
	  srcOffset = offset_record(slotID);
	  destOffset = offset_record(slotID+1);
	}
	else{
	  srcOffset = offset_valueSlot(slotID);
	  destOffset = offset_valueSlot(slotID+1);
	}

	// just shift the whole block, could be more efficient prbly
	int szToShift = MiniDB_Constants.BLOCK_SIZE - destOffset;
	//int szToShift = (numRecsOnBlock - slotID) * bpt.get_indexRecordSize();

	//System.out.println( "pre shift\n" + toString() );
	System.arraycopy( this.buffer, srcOffset, this.buffer, destOffset, szToShift);
	//System.out.println( "post shift\n" + toString() );
	//System.out.println( "Shifted " + szToShift + " bytes starting from " + srcOffset );
      }
      // else MiniDB_Util.waitHere("not shifting");

      // write the record into the slot
      setValue( value, slotID );
      if( isLeafNode ) setBlockID( blockID, slotID );
      else setBlockID( blockID, slotID+1 );
      //writeInt( offset_slot(slotID), blockID );
      //writeLong( offset_slot(slotID)+MiniDB_Constants.BLK_ID_SIZE, value );

      setCurrNumRecordsOnBlock(numRecsOnBlock+1);
    }

    if( !isLeafNode() ){
      //System.out.println( summaryToString() );
      //System.out.println( toString() );
      //System.out.println( "Added " );
    }

    //System.out.println( "after add\n" + toString() );
    //MiniDB_Util.waitHere("leaving addRecord()");

    return success;
  }