public void updatePeerTables()
	{
		int maxRange = Integer.parseInt(agent.getEnvironment().get("max-transmission-range"));
		
		Map<PeerAddress, Peer> routingTable1 = agent.getPeers();
		for (Map.Entry<PeerAddress, Peer> entry : routingTable1.entrySet())
		{
			Peer peerN = entry.getValue();
			peerN.getLocation().move(peerN.getVelocity(), (int)(System.currentTimeMillis() / 1000));
			
			// TODO move out of range nodes to table2?
			if(peerN.getLocation().distanceTo(agent.getPeer().getLocation()) > maxRange){
				routingTable1.remove(entry.getKey());
			}
		}
		
		if(!this.twoHopEnabled)
			return;

		Map<PeerAddress, HashMap<PeerAddress, Peer>> routingTable2 = agent.getPeers2();
		for (Entry<PeerAddress, HashMap<PeerAddress, Peer>> entry : routingTable2.entrySet())
		{
			Map<PeerAddress, Peer> subTable = entry.getValue();
			for (Map.Entry<PeerAddress, Peer> subEntry : subTable.entrySet())
			{
				
				Peer peerN = subEntry.getValue();
				peerN.getLocation().move(peerN.getVelocity(), (int)(System.currentTimeMillis() / 1000));
				
				if(peerN.getLocation().distanceTo(agent.getPeer().getLocation()) < maxRange){
					subTable.remove(subEntry.getKey());
					routingTable1.put(subEntry.getKey(), subEntry.getValue());
				}
				
			}
		}
	}