add reset function()
modified index.html and main.js