Reformatted the code to match the PEP8 python styling guide