refactoring in modules