Use an anonymous function and get plugin class name dynamically