cleaned up code, using new IDE (PyCharm)