                             
                             if(counter == 0){  // ELEMENT ID
                                 elements[num_elements] = new IOElement();
-                                req += "{\"id\":\"";
-                                req += board_id;
-                                req += "_";
-                                req += field;
-                                req += "\", \"element\":{";
+//                                req += "{\"id\":\"";
+//                                req += board_id;
+//                                req += "_";
+//                                req += field;
+//                                req += "\", \"element\":{";
+                                client.print("{\"id\":\"");
+                                client.print(board_id);
+                                client.print("_");
+                                client.print(field);
+                                client.print("\", \"element\":{");
+                                
                                 int len = strlen(board_id) + 1 + field.length() +1 ;  // BOARD_ID + _ + id + \0
                                 char * buf = (char*) malloc(sizeof(char)*(len));
                                 strcpy(buf,board_id);

                            if(strcmp(cmd,"str")==0){
                                client.print("{\"cmd\":\"str\",");                                  
                                for(int i=0; i<num_elements; i++){
                                    if(strcmp(elements[i]->id, eid) == 0)
                                        elements[i]->active = true;
                                }
                            }
                            else{ 

                                elements[num_elements]->pin = field.toInt();
                            }
                            else if(counter == 4){  // ELEMENT MAXIMUMRANGE
//                                req += "\"maximumRange\":\"";
//                                req += field;
//                                req += "\",";
                                client.print("\"maximumRange\":\"");
                                client.print(field);
                                client.print("\",");
                            }
                            else if(counter == 5){  // ELEMENT MINDELAY
//                                req += "\"minDelay\":\"";
//                                req += field;
//                                req += "\",";
                                client.print("\"minDelay\":\"");
                                client.print(field);
                                client.print("\",");
                            }
                            else if(counter == 6){  // ELEMENT POWER
//                                req += "\"power\":\"";
//                                req += field;
//                                req += "\",";
                                client.print("\"power\":\"");
                                client.print(field);
                                client.print("\",");
                            }
                            else if(counter == 7){  // ELEMENT RESOLUTION
//                                req += "\"resolution\":\"";
//                                req += field;
//                                req += "\",";
                                client.print("\"resolution\":\"");
                                client.print(field);
                                client.print("\",");
                            }
                            else if(counter == 8){  // ELEMENT TYPE
//                                req += "\"type\":\"";
//                                req += field;
//                                req += "\",";
                                client.print("\"type\":\"");
                                client.print(field);
                                client.print("\",");
                            }
                            else if(counter == 9){  // ELEMENT VENDOR
//                                req +="\"vendor\":\"";
//                                req += field;
//                                req += "\",";
                                client.print("\"vendor\":\"");
                                client.print(field);
                                client.print("\",");
                            }
                            else if(counter == 10){  // ELEMENT VERSION
//                                req +="\"version\":\"";
//                                req += field;
//                                req += "\"}}";
                                client.print("\"version\":\"");
                                client.print(field);
                                client.print("\"}}");
                            }
                            counter++;
                            tp_pos = i+1;
