adding server code using sockets