add report function, and modify the pagenation.