implemented ajax calls for survey submission