updating to new plugin api