Modified Python Sscript