wrap the plugin installed judgement into a function