Made createnetwork function clear