add explanation
rewrite diagraph definition