correction to python script