tried to multithread. It didn't go well