added has_plugin function