improved formatting of .py script