working python script