new function to copyContent