remove StopIteration since it'll 'splode if generator is called outside a for loop