tidyed up python code with reindent