This function can return a value and then let the caller to create the array if necessary. Creating an array can be a waste