added beginnings of socket.io functionality