SIR model with networking approach