add the digraph class
class digraph