rearranging some things and finally converted the plugin architecture to a decorator