private void loadConnections() throws IOException {
    Thread highways = new Thread(new FileLoaderThread("highways", points,
        connections, highwaysQT, tst), "highways");
    Thread expressways = new Thread(new FileLoaderThread("expressways", points,
        connections, expresswaysQT, tst), "expressways");
    Thread primary = new Thread(new FileLoaderThread("primary", points,
        connections, primaryQT, tst), "primary");
    Thread secondary = new Thread(new FileLoaderThread("secondary", points,
        connections, secondaryQT, tst), "secondary");

    highways.isDaemon();
    highways.start();
    expressways.isDaemon();
    expressways.start();
    primary.isDaemon();
    primary.start();
    secondary.isDaemon();
    secondary.start();
    try {
      highways.join();
      expressways.join();
      primary.join();
      secondary.join();
    } catch (InterruptedException e) {
      Controller.catchException(e);
    }

    System.out.println("4 first qaudtrees done");

    controller.getGUI().setupMap();

    Thread normal = new Thread(new FileLoaderThread("normal", points,
        connections, normalQT, tst), "normal");
    Thread small = new Thread(new FileLoaderThread("small", points,
        connections, smallQT, tst), "small");
    Thread paths = new Thread(new FileLoaderThread("paths", points,
        connections, pathsQT, tst), "paths");
    
    paths.isDaemon();
    normal.isDaemon();
    small.isDaemon();

    int threads = Runtime.getRuntime().availableProcessors();
    System.out.println("You have " + threads + " threads available");
    if (threads < 3) { //You have two or less threads available
      paths.start();
      normal.start();
      try {
        paths.join();
        normal.join();
      } catch (Exception e) {
        Controller.catchException(e);
      }
      
      small.start();
      try {
        small.join();
      } catch (Exception e) {
        Controller.catchException(e);
      }
    }else{ //You have more than two threads available
      paths.start();
      normal.start();
      small.start();
      try {
        paths.join();
        normal.join();
        small.join();
      } catch (Exception e) {
        Controller.catchException(e);
      }
    }
    controller.setStatus("Data loaded");
    controller.getGUI().setupMap();
  }