refactor the module