updated network.c