foreach had some bug? anyway, ilambda+ is more elegant here