add module and refactoring