changed AJAX to use jQuery instead of vanilla JavaScript