Use #map instead of manually building up an array