added pagination. fairly straightforward