little refactering