function to copy info when checked