change return value type from ref of ArrayRef to simple ArrayRef