added failure management