handle concurrency between clients