convert to using $plugin instead of $module