[tag] add foreach function