added test for threading

Added a test for threading