final module refactoring