corrected use of GET and POST for AJAX