I think I tried it this way awhile back but kept hitting the StopIteration exception