change to an array from vector