adding .js file and updating html