add fns for strings and update for freqtable fn