public HashMap<String, Double> get_cosine_score_map(
			ArrayList<String> url_list) throws SQLException {
		HashMap<String, Result> temp_resultmap = null;
		String query_word, url;
		double score = 0, query_mag = 1;
		double tfidf_doc, tfidf_query, doc_mag;
		double temp_score;
		String first_result=null;
		for (int i = 0; i < query_words.length; i++) 
		{
			boolean once=true;
			query_word = query_words[i];
			for (int j = 0; j < url_list.size(); j++) 
			{
				url = url_list.get(j);
				
				//artificially increasing scores
				if(url.contains("~"+query_word)){
					score+=200;
					if(once){
					first_result=url.split("~")[0]+"~"+query_word+"/";
					System.out.println("first result "+url.split("~")[0]+"~"+query_word);
					score_map.put(first_result, (double) 1000);
					once=false;
					}
				}
				
								
				temp_resultmap = resultsetmap.get(query_word);	
				Iterator<String> It = temp_resultmap.keySet().iterator();
				while (It.hasNext()) 
				{
					String map_url = It.next().toString();
					Result res = temp_resultmap.get(map_url);
					if (map_url.compareTo(url) == 0)
					{
						tfidf_doc = res.tfidf;
						tfidf_query = query_map.get(query_word);
						score += tfidf_doc * tfidf_query;
						doc_mag = Math.sqrt((double)res.TD);
						score /= (doc_mag * query_mag);

						//add 1 to the query in title
						String title= Server.title_map.get(url);
						
						if(title!=null)	{	
									
								title=title.toLowerCase().replaceAll("[^a-zA-Z0-9'-]", " ").replace(" +", " ");
									if(title.contains(Query)){
										
										score+=1;
									}
						}

						
						if (score_map.containsKey(url))
						{
							temp_score = score_map.get(url);
							temp_score += score;
							score_map.put(url, new Double(temp_score));
						} else
						{
							score_map.put(url, new Double(score));
						}
					}
				}				
			}
		}
		System.out.println("scoremap"+ score_map.toString());
		return score_map;
	}