Adding diagram on toposort