function ans = getField(CDs)
% get a legitimate field

good = false;
flds = fieldnames(CDs);
while ~good
    for int = 1:length(flds)
       fprintf('%d - %s\n', int, flds{int} );
    end

    ch = input('Enter choice: ');
    good = (ch > 0) && (ch <= length(flds));
end
ans = flds{ch};

