changed the way graph is copied to local vairable in compute_resilience