public static void goToUnexplored(){
        
        int x = RobotData.INSTANCE.getLocation().x;
        int y = RobotData.INSTANCE.getLocation().y;
        Point coor = PatternCheck.getClosestUnexplored(x, y, map,0);
        int tarX = coor.x;
        int tarY = coor.y;
        //path planning, going to unexplored
   //   pathPlanner = new PathPlanner(posi, rngi, map);
        map[tarX][tarY] = 3;
                pathPlanner = new PathPlanner(posi, rngi);
          pathPlanner.goToPoint(new Point(tarX, tarY));
        if(leftSide>1 && frontSide>1 && sonarValues[8]>1){
          posi.setSpeed(0,0.15);
          int a  = 0;
          while (a<430){
                a++;
                try { Thread.sleep(100);} catch (Exception e) {}
          }
        }
        boolean bol=false;
        posi.setSpeed(0.7, 0);
        while(!bol){
 
                getSonars(rngi);
                
                if(sonarValues[0]<1 ||sonarValues[2]<1){
                        bol=true;
                        WallFollow();
                }
                
        try {Thread.sleep(10);} catch (InterruptedException e) {}
    }
    }