implement any_of and none_of