added network exception handling