Implmented create network function