added multi-vertex support