   // Start the radio listening for data
   Serial.print("before radio startlistening");
   radio.startListening();
-  delay(10);
+  delay(7000);
+  radio.printDetails();
 
 
 }
 
-int addColor(RX_Sequence sequence) {
-  if (sequence.length > BUFFER_SIZE) {
+int addColor(RX_Sequence& sequence) {
+  if (sequence.len > BUFFER_SIZE) {
     return 1; // cant hold the entire sequence in memory
   }
 
-  sequence.sequence[sequence.length] = random(1, 4); // (yellow, green, red)
+  sequence.sequence[sequence.len] = random(1, 4); // (yellow, green, red)
 
-  sequence.length += 1;
+  sequence.len += 1;
   return 0;
 }
 void setColor(byte color, bool highOrLow) {

  pinMode(13, OUTPUT);
  // 0 the sequence buffer
  memset(&sequence, 0, sizeof(sequence));
  sequence.length = 0;

  setColorHigh(ledR);

  Serial.print("before radio begin");
  
  radio.begin();
  radio.setPALevel(RF24_PA_LOW);
  radio.setChannel(11);
  radio.printDetails();
  


// the loop routine runs over and over again forever:
void loop() {
  if (addColor(sequence)) {
    Serial.print("addColor error");
    
  }
  Serial.print("The sequence is ");
  for (int i = 0; i < sequence.len; i++){
    Serial.print(sequence.sequence[i]);
  }
  Serial.println("");
  Serial.print("The length is ");
  Serial.println(sequence.len);
  Serial.print("RX_Sequence length is ");
  Serial.print(sizeof(RX_Sequence));
  displaySequence(sequence);
  radio.stopListening();
  Serial.println(" waiting to write");
  radio.write(&sequence, sizeof(RX_Sequence));

  // will be high when waiting for a response
  radio.startListening();
  digitalWrite(13, HIGH);
  byte correctSequence = 3;
  Serial.println("before loop");
  while (correctSequence == 3) {
    if (radio.available()) {
      radio.read(&correctSequence, sizeof(byte));
    }
