#2 #7 + refactoring