improved the code, fixed some errors in ajaxinfo