public static ArrayList<Song> initialDownload(String userName)
	{
		ArrayList<Song>	allSongs=new ArrayList<Song>();
		ArrayList<String> dates= new ArrayList<String>();
		ArrayList<String> names= new ArrayList<String>();
		ArrayList<String> artists = new ArrayList<String>();
		Elements dateList;
		Elements nameList;
		Elements artistList;
		Element name;
		Element artist;
		Element date;
		String lastDate;
		String user= userName;
		TimeCalculator calc= new TimeCalculator();
		System.out.println("Going to try and download your listening history now.");
		try {
			Document doc= Jsoup.connect("http://ws.audioscrobbler.com/2.0/?method=user.getrecenttracks&limit=200&user="+user+"&api_key=2f8ae0c603413f99dd8e7d92a5bb430c").get();
			while (doc.hasText()) {
				nameList = doc.getElementsByTag("name");
				artistList = doc.getElementsByTag("artist");
				dateList = doc.getElementsByTag("date");
				for (int i = 0; i < dateList.size(); i++) {  // 0=current song, size-1=oldest song
					name = nameList.get(i);
					artist = artistList.get(i);
					date=dateList.get(i);
					names.add(name.ownText());
					artists.add(artist.ownText());
					dates.add(date.ownText());
				}
				if(dates.size()>0)
				{
					lastDate=dates.get(dates.size()-1);
					System.out.println(lastDate);
					lastTime=calc.calculte(lastDate);
					String url="http://ws.audioscrobbler.com/2.0/?method=user.getrecenttracks&limit=200&user="+user+"&to="+lastTime+"&api_key=2f8ae0c603413f99dd8e7d92a5bb430c";
					doc= Jsoup.connect(url).get();
				}
				
				else
				{
					System.out.println("Error with downloading dates.");
					break;
				}
				
				
			}
			System.out.println("Finnished downloading your listening history.");
			System.out.println("Now preparing your library.");
			getSongLibrary(allSongs, dates, names, artists);
		} catch(Exception e){
			System.out.println("Last.fm connection error");
			System.out.println("Please restart the program.");
			File test = new File("library.txt");
			test.delete();
			System.exit(0);
		}
		if(dates.size()>0)
			lastTime= calc.calculte(dates.get(0));
		return allSongs;
		
		
	}