just a little refactoring