New implementation of vextex and graph