added paginator loop