added sync.RWMutex's to make Graph and Vertex thread safe