Adding vertices() method