NHTSA 's budget for defect investigations and safety standards has shrunk in real terms for years , in a period when the number of models on the market multiplied , computer-driven electronics replaced mechanical functions and the auto industry was globalizing .