fixed for_each arguments