refactored as a plugin and prepare for PyPI