modified generator: now in a "cleaner" form