Replaced iteration with Array#map