refactor. module pattern