get add and update plugin code working