beginning example with sockets