refactoring ajaxResult to requestSuccess variable