complete race condition handling