zhangyuan master finished the "each" function