another little refactor