added thread safety test