added refused connections recognition