updated client to spin new thread for listening to server