replace for with addAll