added pagination for tables