zero race condition code