added thread for client communication
first try of socket communication