adds paginate method

closes #4