public String formatResultAccordingToWeatherLocation(String output, boolean weather, String ownloaction) {
 
	String weatherReportOrLocation=null;
	if(weather==false && ownloaction==null){
		weatherReportOrLocation=output.substring(0, output.indexOf("maps.google.co.in"));
		System.out.println("Location:"+weatherReportOrLocation);
	}
	if(weather==true && (ownloaction==null || ownloaction!=null)){
		String temp,humidity,windspeed;
		System.out.println(output);
		try{
		/*System.out.println("OUT:"+output.substring(0,100));
		System.out.println("0."+output.indexOf("|"));
		System.out.println("1."+output.indexOf("Wind")+4);
		System.out.println("2."+output.indexOf("Humidity"));
		System.out.println("3."+output.indexOf("Humidity")+9);
		System.out.println("4."+output.indexOf("Humidity")+15);*/
		
		temp=output.substring(0, output.indexOf("|"));
		windspeed=output.substring(output.indexOf("Wind")+4,output.indexOf("Humidity"));
		humidity=output.substring(output.indexOf("Humidity")+9,output.indexOf("Humidity")+14);
		weatherReportOrLocation=temp+",\n Wind Speed "+windspeed+",\n Humidity "+humidity;
		}catch(StringIndexOutOfBoundsException e){
			
			String forcastedString=output.substring(output.indexOf("Wed")+3, output.indexOf("Detailed"));
			String tempforcasted[]=forcastedString.split(" ");
			String ToDay="ToDay Max Tempaerature "+tempforcasted[1]+" Min Temparature "+tempforcasted[2];
			String Tomorrow="Tomorrow Max Tempaerature "+tempforcasted[3]+" Min Temparature "+tempforcasted[4];
			String DayAfterTomorrow="DayAfterTomorrow Max Tempaerature "+tempforcasted[5]+" Min Temparature "+tempforcasted[6];
			String TwoDaysAfter="TwoDaysAfter Max Tempaerature "+tempforcasted[7]+" Min Temparature "+tempforcasted[8];
			weatherReportOrLocation=ToDay+"\n"+Tomorrow+"\n"+DayAfterTomorrow+"\n"+TwoDaysAfter;
		}
		
		System.out.println(weatherReportOrLocation);
		
	}
	
	
	return weatherReportOrLocation;
}