use Vertex class and std::vector