Updated python script