handling no pages