use array instead of vector