building the ajax call