public String and(String field, int min, int max)
    {
        String newField = "", number = "";

        System.out.println(field.substring(0, 3));
        if(field.substring(0, 3).equals("AND"))
        {
            newField = ",";
            field = field.substring(3);

            for(int i = 1; i <= field.length(); i++)
            {
                if(isNumber(field.substring(i - 1, i)))
                {
                    newField = newField + field.substring(i - 1, i);
                    number = number + field.substring(i - 1, i);
                }
                else
                {
                    if(field.substring(i - 1, i).equals("A") && field.substring(i - 1).length() > 3)
                    {
                        if(field.substring(i - 1, i + 2).equals("AND"))
                        {
                            newField = newField + ",";
                            number = "";
                             i = i + 2;
                        }
                        else
                        {
                            newField = "~invalid~";
                        }
                    }
                    else if(field.substring(i - 1, i).equals(" "))
                    {
                        //  ignore space
                    }
                    else
                    {
                        newField = "~invalid~";
                        break;
                    }
                }
            }
        }
        else
        {
            newField = "~invalid~";
        }

        return newField;

    }