adding copy function to table