#11 refactoring