working out concurrency pattern