Changed c array to vector<>