changed code to conform to guidelines