added tunable to choose between directed and undirected networks for computation