function to flatten an Array
giving an appropriate name