added test for threading