now to implement the ajax