        Serial.println(F("echo done"));
      }
     }
-    if(num == 1){
+    
+    // initialization: enable the handles
+    if(state == 1){
       if(!rbc_mesh_value_enable((uint8_t) 1)){
        Serial.println(F("enable 1 dropped"));
      }

       Serial.println(F("enable 1 done"));
     }
    }
    if(num == 2){
      if(!rbc_mesh_value_enable((uint8_t) 2)){
       Serial.println(F("enable 2 dropped"));
     }

       Serial.println(F("enable 2 done"));
     }
    }
    
    // toogle state of one handle after every state change
    if(state > 2){
      uint8_t value = (state/2) % 2;
      uint8_t handle = (state % 2) + 1;
      if(!rbc_mesh_value_set(handle, &value, (uint8_t) 1)){
        Serial.println(F("set dropped"));
      }
      else{
        Serial.println(F("set done"));
      }
    }

    // clear the uart_buffer:
