made it fault tolerant