updated logic js, but latency bug still remains at large