updated to work with socket.io 1.x