   // check message format
   // IDXVARVAL
   if (strlen(message) >= 9 && isFuncValid(message) && 
-      (message[1] <= '9' && message[1] >= '0') &&
+      (message[0] <= '9' && message[0] >= '0') &&
       (message[1] <= '9' && message[1] >= '0'))
     return true;
   return false;

      DEBUG_PRINT("IDs counts:");
      DEBUG_PRINTLN(XBeeReturnCount);
      BT.println(XBeeReturnIDs);
      isWaitingReply = false;      
    }
  }
      

void loop() {
  if (isWaitingReply) {
    if (XBee.available()) {
      if (XBeeReturnCount > 1) {
        XBeeReturnIDs[XBeeReturnCount*3-1] = ':';
      }
      delay(10);
      readStringfromSerial(&XBee, message);
