#4: refactoring