use socket.io instead of ajax