add previous and next page judge