little refactoring for better consistency