ticket:9 refactoring