replace vector with array.