A little refatoring