performance: little refactor