converting to Pyton 3 and PEP 8 - ended