working classfier and AJAX requests