simple way to flatten an array