refactoring modules