first pass at generator