add the paging function and 500 error page
add the paging function and 500 error page