find optimalization is only valid id pred = a==b