added threading and sockets
added threading and sockets