Added save function to network