changed readtable and added copy-readtable