ticket:3 refactoring