extracted view data and members per page functionality to a service