ticket:10 refactoring