tweaked JS and html