public List<Double> getStat(String statIndex, Date currDate) {
        List<Double> retList = new ArrayList<Double>();

        try {
            View view = client.getView("get", "get_thread_vm");
            Query query = new Query();
            query.setIncludeDocs(true).setLimit(20);
            query.setStale(Stale.FALSE);
            ViewResponse result = client.query(view, query);

            for (ViewRow row : result) {
                String wrkString = row.getDocument().toString();
                wrkString = wrkString.substring(1, wrkString.length()).substring(0, wrkString.length() - 2);

                String[] statVals = wrkString.split(",");
                String dblToParse = null;
                String dateToParse = null;

                for(String vals : statVals) {
                    String[] pairs = vals.split(":");
                    String key = pairs[0].substring(1, pairs[0].length()).substring(0, pairs[0].length() - 2);

                    if (key.equals(statIndex))
                        dblToParse = pairs[1].substring(1, pairs[1].length()).substring(0, pairs[1].length() - 2);

                    if (key.equals("date_time")) {
                        String[] dateParts = vals.split("\":\"");
                        dateToParse = dateParts[1].substring(0, dateParts[1].length() - 1);
                    }
                }

                Date dateToCheck = dateFormat.parse(dateToParse);

                if (currDate.compareTo(dateToCheck) < 0)
                    retList.add(Double.parseDouble(dblToParse));
            }
        }
        catch (Exception ex) {
            System.out.println(ex.getMessage().toString());
            System.exit(1);
        }

        return retList;
    }