use map rather than Array.new