Making the code fault tolerant