networkHandler class made asynchronous