Created a new script for js file and added script to html index