partially clean up partial stuff
copy_function