public static SortedMap<Double, List<Double>> classify(double[] breakPoints, double[] data) {
        SortedMap<Double, List<Double>> sortedMap = new TreeMap<Double, List<Double>>();
        double nextbreakPoint = Double.MAX_VALUE;
        DecimalFormat twoDForm = new DecimalFormat("#.##"); //format to two decimal places
        for (int i = 0; i < data.length; i++) {
            double value = data[i];
            for (int j = 0; j < breakPoints.length; j++) {
                double breakPoint = breakPoints[j];
                breakPoint = Double.valueOf(twoDForm.format(breakPoint)); //format to two decimal places
                //sLogger.debug(breakPoint);
                if (j + 1 < breakPoints.length) {
                    nextbreakPoint = breakPoints[j + 1];
                    nextbreakPoint = Double.valueOf(twoDForm.format(nextbreakPoint)); //format to two decimal places
                } //all classes are mutaully exclusive
                //check if in the first class range
                if (j == 0 && value <= breakPoint) {

                    List<Double> list = getList(breakPoint, sortedMap);
                    list.add(value);
                }
                //check if in middle
                else if (breakPoint < value && value <= nextbreakPoint) {
                    List<Double> list = getList(nextbreakPoint, sortedMap);
                    list.add(value);
                }
                //else if no value in the break point record null
                else {
                    List<Double> list = getList(nextbreakPoint, sortedMap);
                }
            }
        }

        Set<Double> bands = sortedMap.keySet();
        for (Double band : bands) {
            sLogger.debug("=< " + band);
            List<Double> values = sortedMap.get(band);
            for (Double value : values) {
                sLogger.debug("\tValue: " + value);
            }
        }

        return sortedMap;
    }