add directed graph