updated code to conform to coding standards