threading stuff working, exiting client working