update network.r ms02 function