trying to allocate array in a function and return it