implemented copy to clipboard function