 
 		ActionScore maxScore;
 
-		db.readRec(records[ctxpair] & ACTION0_MASK, EDB_REC actionScore1 );
-		db.readRec(records[ctxpair] & ACTION1_MASK, EDB_REC actionScore2 );
-		db.readRec(records[ctxpair] & ACTION2_MASK, EDB_REC actionScore3 );
-		db.readRec(records[ctxpair] & ACTION3_MASK, EDB_REC actionScore4 );
+		db.readRec(ctxinfo & ACTION0_MASK, EDB_REC actionScore1 );
+		db.readRec(ctxinfo & ACTION1_MASK, EDB_REC actionScore2 );
+		db.readRec(ctxinfo & ACTION2_MASK, EDB_REC actionScore3 );
+		db.readRec(ctxinfo & ACTION3_MASK, EDB_REC actionScore4 );
 
 		maxScore = actionScore1;
 		if(maxScore > actionScore2.score) {

	//eps indicates how often we should randomly select

	byte epsilon = (byte)random(100);

	if (epsilon < eps) {
		ActionScore as;
		db.readRec(lookups[ctxpair] & (15 << (random(4) * 4)), EDB_REC as)
		return as;
	}
	else {


//int lookups[256];
//lookups[0b00101010] = 0b0011110111001001;
//int lookups[256]; //we should probably burn this into prog memory 

// The read and write handlers for using the EEPROM Library
void writer(unsigned long address, byte data)
