switching generator classes, and adding inheritance