handler the ajax request