for #2, take a look at the "for each" command