little refactoring