revised attempt at concurrency