add copy and swap sample