adding graph abstraction