complete the raising race condition problem version.