added basic pagination for widget.