made functions support old and new style plugins concurrently