use array instead of array ref