trying to write better generators