made corrections to conform to PEP8