fix code to conform to coding standards