cleaning up code to make it more PEP-8 compilant