added pager and empty page check