Let data be list instead of iterator