refactoring modules. related to #1