add $c as a parameter to the plugin functions for more flexibility.