refactoring #139