Changed AJAX function to include data