functionality to copy text to clipboard