Changed array to vector