updated code to support setuptools based plugins