pasteFunction changes

committing latest changes