implement copying objects