updated the JS file that handles the form processing