this is a very nice ruby way to do the loop - it needs a comment since it may not be obvious to readers.