1990 Nissan Maxima - hesitates and losses power

1990 Nissan Maxima, 187,000 miles, very well maintained



The car runs very smoothly with normal power when it is cold. As it warms up it runs rough and get worse with time although it runs smoothly at times. Generally after it is warmed up, it hesitates when accelerating from a dead stop, runs rough at all speeds but runs better at higher than normal rpms. It also accelerates much better from a stop if I give it a lot of throttle but is still rough and hesitates a little. It frequently losses power on the freeway and begins to slow when the throttle is held steady but accelerates if I give it much more throttle or drop it out of of overdrive to increase rpms. Sometimes it runs smoothly on the freeway then losses power and jerks like it is hesitating and about to die but has never died. The check engine light came on and the codes indicated a bad temp sensor and then a bad oxygen sensor, both were replaced. The mechanic also cleaned the idle valve and replaced some damaged wires to the oxygen sensor. All of the vacuum lines checked out OK. The problem still exists. Any suggestions??