optmized the ajax to get record content