changed POST to AJAX implementation; possible issues with content-type