private List<Integer> processLine(String line, List<Integer> list) {

        Scanner scanner = new Scanner(line); //create scanner for line

        while (scanner.hasNextInt()) {
            list.add(scanner.nextInt());
        }
        return list;
    }