modify code to comply with PEP 8