using with_exclusive_scope