change vector to array