   }
 }
 
+#ifdef DUBUG_BUILD
 void debug(String out) {
+  Serial.print("Debug: ");
   Serial.println(out);
 }
-
-void debugAllNodes() {
+#endif
+
+void com_rfi() {
+  Serial.println(HB_VERSION);
+  Serial.print("Serial state: ");
+  Serial.println(state);
+  com_graph();
+}
+
+void com_graph() {
   int i;
-  Serial.println("all nodes:");
+  Serial.println(START_HBG);
+  Serial.println(NODES_HBG);
   for (i = 0; i < 10; i++) {
     if (nodes[i].name[0]) {
       Serial.print(i);

   } 
  }
  if (!stringComplete) {return;}
  if (state == 0 && inputString == "1_hbumtf_v0") {
    next_state = 1;
    debug("load|"+inputString);
  }
  else if (state == 0) {
    debug("outside_cmd|"+inputString);
    if (inputString == "rfi") {
      Serial.println(HB_VERSION);
      Serial.println(state);
      debugAllNodes();
    }
  }
  if (state == 1 && inputString == "nodes:") {
    node_i = 0;
    next_state = 2;
    state = -1;
    //debug("state from|" + state + "|to|" + next_state);
  }
  if (state == 2 && inputString == "edges:") {
    edge_i = 0;
    next_state = 3;
    state = -1;
  }
  if (state == 3 && inputString == "0_hbumtf") {
    next_state = 0;
    state = -1;
    debugAllNodes();
  }
  // processing for states 2 and 3
  if (state == 2) {
    debug("parsing node|"+inputString);
    int i = 0;
    char temp[10];
    i = crawlStr(temp, i, inputString, '|');

      Serial.println("");
    }
  }
  Serial.println(EDGES_HBG);
  for (i = 0; i < 10; i++) {
    if (edges[i].type[0]) {
      Serial.print(i);
      Serial.print("|");
      Serial.print(edges[i].from);
      Serial.print("|");
      Serial.print(edges[i].to);
      Serial.print("|");
      Serial.print(edges[i].type);
      Serial.print("|");
      Serial.print(edges[i].name);
      Serial.print("|");
      Serial.print(edges[i].guard);
      Serial.println("");
    }
  }
  Serial.println(END_HBG);
}
