public String addingYear(String field, int before, int max)
    {

        String newField = "";

        for(int i = 1; i <= field.length(); i++)
        {
            if(isNumber(field.substring(i - 1, i)))
            {
                newField = newField + field.substring(i - 1, i);
            }
            else
            {
                newField = "~invalid~";
                break;
            }

            boolean over = false;
            try
            {
                if(Integer.parseInt(newField) > (max - before))
                {
                    over = true;
                }
            }catch(Exception e)
             {
                System.out.println("not a integer");
             }

             if(over)
             {
                System.out.println(newField + " > " + max);
                newField = "~invalid over~";
                break;
             }


        }

        boolean under = false;

        try
            {
                if(Integer.parseInt(newField) < 0)
                {

                    under = true;
                }
            }catch(Exception e)
             {
                System.out.println("not a integer");
             }

            if(under)
            {
                newField = "~invalid under~";
            }

        newField = " ADD " + newField;

        return newField;

    }