using socket.io to sync data between server and client