 			break;
 	}
 
-	switch(ctxpair & TO_CTX_MASK) {
+	switch(tomood) {
 		case SAD:
 			strip.setPixelColor(1, SAD_COLOR);
 			break;


	/** Database Setup **/
	Serial.begin(9600);
	Serial.print("Max DB records: ");
	Serial.println(MAX_RECORDS);

	//check if the DB exists


	}
	else {
		Serial.println(F("Using existing DB"));
	}

	//wait for the ready message from the mini computer?
}

void loop() {
        //Serial.print("freeMemory()=");
        //Serial.println(freeMemory());
  
  
        Serial.println(F("Retrieving mood"));
  	//insert retrieving EEG return codes here
	//
	byte ctxpair = reccodes2ctx();
        byte frommood = ((ctxpair & FROM_CTX_MASK) >> 4);
        byte tomood = (ctxpair & TO_CTX_MASK);
        Serial.print(frommood, BIN);
        Serial.print(F("|"));
        Serial.println(tomood, BIN);
        
        Serial.println(F("Lighting LEDs"));
	switch(frommood) {
		case SAD:
			strip.setPixelColor(0, SAD_COLOR);
			break;
