implemented pasting