private int getVersionNumberFromFileServer(String filename, FileServerInfo info)
	{
		int version = -1;
		try
		{
			Socket socket = new Socket(info.getAddress(), info.getPort());
			ObjectOutputStream oos = new ObjectOutputStream(socket.getOutputStream());
			oos.flush();
			ObjectInputStream ois = new ObjectInputStream(socket.getInputStream());
			VersionRequest tmp = new VersionRequest(filename);
			VersionRequest request = new VersionRequest(hMac.createHash(tmp.toString()), filename);
			oos.writeObject(request);
			oos.flush();
			Response response = (Response)ois.readObject();
			if (response instanceof MessageResponse)
			{
				System.out.println(((MessageResponse)response).gethMac());
				System.out.println(response.toString());
				if (!hMac.verifyHash(((MessageResponse)response).gethMac(), response.toString())) 
				{
					System.out.println("This message has been tampered with: " + response.toString());
				}
				if (response.toString().equals("!again"))
				{
					oos.writeObject(request);
					oos.flush();
				}
			}
			if (response instanceof VersionResponse)
			{
				version = ((VersionResponse) response).getVersion();
			}
			oos.close();
			ois.close();
			socket.close();
		} 
		catch (IOException e)
		{
			e.printStackTrace();
		} 
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}
		return version;
	}