move plugins to plugins.py to make it easier to avoid circular imports