updated code to PEP8 standards