correct the paginations bug
refactor datatables