#2 refactoring