added some concurrency code