added AJAX for responses