how about using Array.map here?