prepare for socket.io