  // cout << "[""]" << "\n";
 
 // updateSonar();
-reset_path();
-reset_lists();
-update_grid(0,0,18,0);
- FindPath(0,0,18,0);
-      show_Grid();
+reset_path(); //first you reset path
+reset_lists(); //then reset list
+update_grid(0,0,18,0); //then update grid for obstacles 
+ FindPath(0,0,18,0); // then find the path based on updated grid
+      show_Grid(); //then show the vidualized grid
 
 delay(5000);
 }

  NewPing(trigger[0], echo[0], 500), //500 represents type of sensor
};

void updateSonar() {
  for (int i = 0; i < 1; i++) {
    //cm[i]=sonar[i].ping_cm();

      }
    }
}
//erases open and closed list
void reset_lists(){
  open.clear();
  closed.clear();
