Here you use collect but later you use map. I'd recommend being consistent.