saving before adding AJAX