plugin refactoring done