a little refactor again