change dic to data.frame before passing to save_table