little refactor