change module code and refactoring