public void ReadData() {
        BufferedReader br = null;

        //Read data from file
        try {
            String sCurrentLine;
            br = new BufferedReader(new FileReader(filename));
            String CurrentID = "";
            List ProbabilityList = new ArrayList();

            //Read through file line by line, create one histogram per ID.
            while ((sCurrentLine = br.readLine()) != null) {
                sCurrentLine = sCurrentLine.replace("|", "_"); //splitting on | does not work
                String[] SplittedLine = sCurrentLine.split("_"); //split line in ID and probability

                if (CurrentID.equals(SplittedLine[0])) {
                    //still same histogram, keep on combining

                } else {
                    //start of new histogram, first save previous, then continue

                    //process previous histogram
                    if (!CurrentID.equals("")) {
                        addHistogram(CurrentID, ProbabilityList);
                    }
                    
                    //Reset parameters
                    //ProbabilityList.clear();
                    ProbabilityList = new ArrayList();
                    
                    CurrentID = SplittedLine[0];
                }
                //collect probabilities that belong to the same ID
                ProbabilityList.add(Double.parseDouble(SplittedLine[1]));
            }
            //Add the last values
            addHistogram(CurrentID, ProbabilityList);
            System.out.println("Data imported");
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            try {
                if (br != null) {
                    br.close();
                }
                System.out.println("File closed");
            } catch (IOException ex) {
                ex.printStackTrace();
            }
        }
        //Data imported
        
    }