added pagination helper; added pagination for favorites output