added pagination to table