exceptions and for loops