updated syntax for generators