implement network with digraphs
fix network running; add tests