a little refactor to be less gross