changed array to vector