Modified code for one to one chat using Threading