public static void main(String[] args) {
		
		double startLat = 41.82967; // constants
		double startLong = -71.40210;

		
		
		String ways;
		String nodes;
		String index;
		String hostname;
		int trafficport;
		int serverport;
		
		BackendWorker backend = null;
		Map<String,Double> trafficData = null;
		Server server = null;
		
		if (args.length != 6) {
			System.err.println("ERROR: Incorrect number of arguments");
			printUsage();
		}
		
		
		// parse command line options
		try {
			ways = args[0];
			nodes = args[1];
			index = args[2];
			hostname = args[3];
			trafficport = Integer.parseInt(args[4]);
			serverport = Integer.parseInt(args[5]);
		} catch (NumberFormatException e) {
			System.out.println("ERROR: trafficport and serverport must be integers");
			printUsage();
			return;
		}
		
		// initialize traffic data hash map
		trafficData = Collections.synchronizedMap(new HashMap<String,Double>());
		
		// initialize backend
		try {
			backend = new BackendWorker(index, nodes, ways,trafficData);
			
			Node startNode;
			try {
				startNode = backend.latLongQuery(startLong, startLat);
			} catch (IOException e) {
				System.out.println(e.getMessage());
				return;
			}
			new MapsGUI(backend, startNode);
			
			
			
			
			
		} catch (FileNotFoundException e) {
			System.out.println("ERROR: File not found.");
			return;
		} catch (IOException e) {
			System.out.println(e.getMessage());
			return;
		}
		
		// initialize and run server
		try {
			server = new Server(serverport,hostname,trafficport,backend,trafficData);
		} catch (IllegalArgumentException e) {
			System.out.println(e.getMessage());
			return;
		} catch (IOException e) {
			System.out.println(e.getMessage());
			return;
		}
		server.run();

	}