Added nested loops.

Nested loops don't work, however.