added variable for threshold for switching from "all congested" --> "connection failed"