connect vertices