only show pagination if needed