updated the plugin to be compatible with lates API upgrades