public ArrayList<Vertex> gpsrPath(int sourceIndex, int sinkIndex) {
    
    	DijkstraVertex sourceVertex = new DijkstraVertex();
    	DijkstraVertex sinkVertex = new DijkstraVertex();
    	DijkstraVertex currentVertex = new DijkstraVertex();
    	DijkstraVertex tempVertex = new DijkstraVertex();
    	ArrayList<Vertex> GPSRPath = new ArrayList<Vertex>();
    	boolean flag = true;
    	sourceVertex = newLocation.get(sourceIndex);
    	sinkVertex = newLocation.get(sinkIndex);
    	currentVertex = sourceVertex;
    	GPSRPath.add(sourceVertex);

    	while(!currentVertex.equals(sinkVertex) && flag == true){
        	tempVertex = currentVertex;
        	int CVIndex = newLocation.indexOf(currentVertex);
    		for(int counter = 0; counter < adjList.get(CVIndex).size(); counter++){
    			if(currentVertex.distance(adjList.get(CVIndex).get(counter)) <= transmissionRange && tempVertex.distance(sinkVertex) > sinkVertex.distance(adjList.get(CVIndex).get(counter))){
   					tempVertex = adjList.get(CVIndex).get(counter);			
    			}
    		}


    		if(currentVertex.equals(tempVertex) && !tempVertex.equals(sinkVertex)){
    	        flag = false;
    		}else{
    			currentVertex = tempVertex;
    			GPSRPath.add(currentVertex);
    		}
    	}
    	
    	if(flag == false){
    		return new ArrayList<Vertex>(0); // empty array list | return if GPSR fails
    	}else{
    		return GPSRPath; // empty array list | return if GPSR fails
    	}
    }