modules refactoring