#10 refactoring