use a more idiomatic foreach my