neither of the if()'s are required.  Could use an iterator on the first (no big deal).