Changing the script to HTML5 version