added ajax function to js file that was overwritten