public List<Curve> parsePlotInCsv() throws IOException {

        CustomReader csvReader = new CustomReader(this.reader, separator);

        String[] header = csvReader.readRaw();

        Map<String, Curve> curveMap = new HashMap<String, Curve>();

        // for all curve's column
        for (int i = 1; i < header.length; i ++) {
            curveMap.put(header[i], new Curve(header[i]));
        }

        String [] raw;
        int column = 1;
        while (null != (raw = csvReader.readRaw())) {

//            if (raw.length < header.length) {
//                break;
//            }
            System.out.println(raw.length);
            for (int i = 0; i < raw.length; i++) {
                System.out.print(raw[i] + ", ");
            }
            System.out.println();

            if (raw[column] == null || raw[column].isEmpty()) {
                column ++;
            }

            curveMap.get(header[column]).addPoint(
                    new Point(
                            new Double(raw[0]).longValue(),
                            Double.parseDouble(raw[column])
                    )
            );
        }


        // sort as they are in csv
        List<Curve> sortedArrayList = new ArrayList<Curve>(header.length - 1);
        for (int i = 1; i < header.length; i ++) {
            sortedArrayList.add(curveMap.get(header[i]));
        }

        return sortedArrayList;
    }