made necessary bug changes to dynamically assign generator name variable