public static TableModel loadTableFromText(Map<Integer, Double> input) {
        List<Result> resultList = new ArrayList<Result>();
        Iterator it = input.entrySet().iterator();
        while (it.hasNext()) {
            Map.Entry pairs = (Map.Entry) it.next();
            int key = Integer.parseInt(pairs.getKey().toString());
            double value = Double.parseDouble(pairs.getValue().toString());
            resultList.add(new Result(key, value));
            it.remove(); // avoids a ConcurrentModificationException
        }
        return new TabelModelResult(resultList);
    }