added ability to read network from string