private String getCommaStringFromArrayList(ArrayList<String> a)
    {
        if (a.size() == 0)
        {
            return "";
        } else
        {
            String s = "";
            for (int i=0;i<a.size();i++)
            {
                if (i != a.size()-1)
                    s = s + a.get(i) + ",";
                else
                    s = s + a.get(i);
            }
            return s;
        }

    }