Tried t omake it multithreaded.  But it hangs