updated graph implementation to the latest stable version