Created separate plugin function for append and delete