turn the script into py3