Monte-Carlo modeling of degradation of polymer networks