introducing socket.io and a few changes