support array as ref parameter