ticket:5 refactoring