added thread unit tests