add loop through pages
add total records
update loop