fixed up python script for commandline