made the script python2.5 compatible, and tested it