smart copy/paste