Improving pagecontains