Adjusted code to adhere to PEP8