changed generator syntax