Added new code to the JavaScript file