adapting for concurrency