refactored module structure