 
     // Null terminate the buffer string
     *ptr = '\0';
-    Serial.println(buffer);
-    // Define serial connection to SD card
-    // Attempt to load file
+    
+    // Set up tokenizer for the file buffer string
+    char delimiter[2] = ",";
+    char* token;
+    int col = 0;
+    int row = 0;
+    
+    // get the first token 
+    token = strtok(buffer, delimiter);
+    
+    // walk through other tokens
+    while( token != NULL && row < MAX_WAYPOINTS ) 
+    {
+      switch (col % 10)
+      {
+        case 0:  // latitude
+        Nodes[row].east_mm = atol(token);
+        col++;
+        break;
+        
+        case 1:  // longitude
+        Nodes[row].north_mm = atol(token);
+        col++;
+        break;
+        
+        case 2:  // filename
+        if (token == "END")
+        {
+          Nodes[row].destination[0] = END;
+        }
+        else
+        {
+          Nodes[row].destination[0] = atoi(token);
+        }
+        col++;
+        break;
+        
+        case 3:  // filename
+        if (token == "END")
+        {
+          Nodes[row].destination[1] = END;
+        }
+        else
+        {
+          Nodes[row].destination[1] = atoi(token);
+        }
+        col++;
+        break;
+
+        case 4:  // filename
+        if (token == "END")
+        {
+          Nodes[row].destination[2] = END;
+        }
+        else
+        {
+          Nodes[row].destination[2] = atoi(token);
+        }
+        col++;
+        break;
+
+        case 5:  // filename
+        if (token == "END")
+        {
+          Nodes[row].destination[3] = END;
+        }
+        else
+        {
+          Nodes[row].destination[3] = atoi(token);
+        }
+        col++;
+        break;
+
+        case 6:  // filename
+        Nodes[row].Distance[0] = atol(token);
+        col++;
+        break;
+
+        case 7:  // filename
+        Nodes[row].Distance[1] = atol(token);
+        col++;
+        break;
+
+        case 8:  // filename
+        Nodes[row].Distance[2] = atol(token);
+        col++;
+        break;
+
+        case 9:  // filename
+        Nodes[row].Distance[3] = atol(token);
+        col++;
+        row++;
+        break;
+
+        default:  // unexpected condition; print error
+        Serial.println("Unexpected error happened while reading map description file. Please verify the file is in the correct format. Planner may not work correctly if this message appears.");
+        break;
+      }
+      token = strtok(NULL, delimiter);
+    }
+    map_points = row;
+    
     // If file loaded, read data into Nodes[]
     free(buffer);
     myFile.close();

      {
        Serial.println(map_file_names[i]);
      }
    }
    
    // Free the memory allocated for the buffer    
    free(buffer);
    

     
  /* Convert latitude and longitude positions to flat earth coordinates.
     Fill in waypoint structure  */
       GetGoals(mission, CONES);
       
       // Send mission to C3.
       SendPath(mission, CONES);
