Updated to include code according to PEP8 style guide