remove useless code from ajax