 //        digitalWrite(ledPin, LOW);
         
         
-  
+      
+        switch (xbee.getResponse().getApiId()) {             //what kind of packet was received
+            case ZB_RX_RESPONSE:                             //rx data packet
+                xbee.getResponse().getZBRxResponse(zbRX);    //get the received data
                 
                 
                 

      
      if (xbee.getResponse().isAvailable()) {
        
         if (xbee.getResponse().getApiId() == ZB_RX_RESPONSE) {
      
             xbee.getResponse().getZBRxResponse(zbRX);
          
        //tone(pizeoPin, 400, 200);
        lcd.clear();

                        digitalWrite(redLEDPin, HIGH);
                      } else if (bookedState == 0){
                        
                        digitalWrite(greenLEDPin, LOW);
                        digitalWrite(blueLEDPin, HIGH);
                        
                        digitalWrite(redLEDPin, LOW);
                      } else {
