private void makeExitPath(int r, int c, int path){
	//creates pathways based on the principle that each path element expands in every possible direction it can. - "can" is based on whether the place it attempts to expand to has any neighbors itself - if it does then the path does not expand that way (prevents paths from running into eachother - however, if it doesn't than the path expands in that direction as well as every other direction.
	_path = path;

	int []count = countAround(r,c);
	int cF = 0;
	for (int i = 0; i < count.length; i++){
	    if (count[i] == 1 || count[i] ==2 )
		cF++;
	}
	if (cF == 4)
	    return;
	else 
	    _mazeArray[r][c] = path;
		
	ArrayList<Integer> randomSet= new ArrayList();
	for (int i = 0; i  < 4; i++)
	    randomSet.add(i);
       

	
	boolean exitPathPlaced = false;
	for (int i = 0; i < 4; i++){
	    int randomInt = (int) (Math.random() * randomSet.size());
	
	    int randomNum = randomSet.remove(randomInt);
		
	    if (count[0] == 0 && randomNum == 0){

		    int total = 0;
		    int [] neighbors= countAround(r-1,c);
		    for (int k = 0; k < 4; k++)
			if ( neighbors[k] ==1)
			    total++;
		    if (total < 2){

        
			    makeExitPath(r-1,c,path++);
        
			
		    }
	    }
	  
	    if (count[1] == 0 && randomNum == 1){
		int total = 0;
		int [] neighbors= countAround(r,c+1);
		for (int k = 0; k < 4; k++)
		    if ( neighbors[k] ==1)
			total++;
		if (total < 2){
		
		    	makeExitPath(r,c+1,path++);

		    }
	    }
	   
	     if (count[2] == 0 && randomNum == 2){
			    int total = 0;
		    int [] neighbors= countAround(r+1,c);
		    for (int k = 0; k < 4; k++)
			if ( neighbors[k] ==1)
			    total++;
		    if (total < 2){
        
			    makeExitPath(r+1,c,path++);
	        
		    }
	    }
	    
	    if (count[3] == 0 && randomNum == 3){
		    int total = 0;
		    int [] neighbors= countAround(r,c-1);
		    for (int k = 0; k < 4; k++)
			if ( neighbors[k] ==1)
			    total++;
		    if (total < 2){
			    makeExitPath(r,c-1,path++);

		    }
	    }
	    
	}
      
	       


	
    }