updated scripts

I made a couple of modifications on python script.