adds function for preventing overriding on paste