Change lists to generators