public ArrayList<JobPosting> findBestMatches(User u, ArrayList<JobPosting> jobsList){
		
		ArrayList<JobPosting> matchingFieldsList = new ArrayList<JobPosting>();//This stores the jobPostings that have the users desired job field
		
		//Picks out the job postings that are in the area of interest of the user
		System.out.println("Companies in the users desired field");
		for(int i = 0; i<jobsList.size(); i++){
			
			JobPosting tempJob = jobsList.get(i);
			String jobField = tempJob.getJobType().toUpperCase();
			String usrField = u.getAreaOfInterest().toUpperCase();
			
			if(jobField.equals(usrField)){
				matchingFieldsList.add(jobsList.get(i));
				System.out.println(jobsList.get(i).getCompanyName());
			}
		}
		
		int size = matchingFieldsList.size();
		int[] scoreArr = new int[size];
		System.out.println("Scoring: ");
		for(int i = 0; i<size; i++){
			int tempScore = produceScore( u , matchingFieldsList.get(i) );
			scoreArr[i] = tempScore;
			System.out.println(matchingFieldsList.get(i).getCompanyName() + ":  " + tempScore);
		}
		
		
		//Bubble sort
		 int j;
	     boolean flag = true;   // set flag to true to begin first pass
	     int temp;   //holding variable
	     
	     while ( flag )
	     {
	            flag= false;    //set flag to false awaiting a possible swap
	            for( j=0;  j < scoreArr.length -1;  j++ )
	            {
	                   if ( scoreArr[ j ] < scoreArr[j+1] )   // change to > for ascending sort
	                   {
	                           temp = scoreArr[ j ];                //swap element
	                           scoreArr[ j ] = scoreArr[ j+1 ];
	                           scoreArr[ j+1 ] = temp;
	                           
	                           Collections.swap(matchingFieldsList, j, j+1);
	                           
	                          flag = true;              //shows a swap occurred  
	                  } 
	            } 
	      }  
	    System.out.println("Final list of companies in sorted order: ");
		for(int i = 0; i<matchingFieldsList.size(); i++){
			System.out.println(matchingFieldsList.get(i).getCompanyName());
		}
	     
		return matchingFieldsList;
	}