ticket:7 little refactoring