deleting unnecessary pages