Cut out the second call to .map so it happens in a single pass.