module refactor