update plugin code