added pagination to the portrait and list view