write by yiting  for interface iterable and collection