added paginator functionality