a little refactoring to conform to standards