refactoring on the modules