Simple refactoring. 2nd attempt