Allow passing functions as plugins