     }
     else{                                                     //if no error happened in reading
       radio.read(&onReference, sizeof(float));                //read the on light refrence 
-      if(serial_state){
+      if(serial_state){                                       //check to see if serial bus is connected
         Serial.print("onRef received: "); Serial.println(onReference);
         Serial.println("---------------------------------------");
       }

    if (!ret) {                                               //if transmission fialed
      radio.startListening();                                 //start listening for incoming messages, Rpi might send some other message later on
      //radio.printDetails();
      if(serial_state){
        Serial.println("failed to send ACK");                   //print error message if module failed to send data
        Serial.println("---------------------------------------");
      }
      return 1;                                               //exit with error

/*
 * Main Control Team
 * Arduino Control: Sultan Ibrahim Ibrahim
 * commented commands are used for debugging 
 * NRF24l01+ connections:
    MOSI is connected to the digital pin 11
    MISO is connected to the digital pin 12
    SCK is connected to the digital pin 13
