added concurrency test. slight rearrangement