add header
add safe cop
modify copy to safecopy