adding graph class where graph inherits from directedGraph