module refactoring