added a function to test concurrency features.