updated and moved AJAX