ticket:13 refactoring