modified the code to support multiple clients through multi-thread. Every client's connection is running in a separate thread