removing PHP and adding AJAX