many bugs fixed, can run rand test without error; Although much slower when more threads