refactoring... (no logic changes)