completes pagination example