Pass an arrayref instead of array