working implementation of plugins