Wenduo's original version of the script.