refactored module