little refactored