implemented thread stuff for NetworkClient