network constructor