Question on Kia Optima Idle

Driving around, the original very rough idle has come back. I’m starting to think the replacement egr valve is faulty, but it hasn’t thrown a code yet. This is frustrating.

Just bought a new battery at costco, if that doesn’t change I can return it easily.

Battery didn’t do anything; I had a friend who works on cars take a look, he told me he had recently worked on a similar car same engine (not same problem though) and that replacing the TPS made the car run much smoother.

Took his advice, went and bought a new TPS, installed it, and the car did run much smoother, but there is still a little surging feel, and a little rpm sway. Much better, but not perfect.

Any other ideas? I might have to replace the injectors is what I’m thinking, or the replacement egr is bad

Any one have any other thoughts on what this could be?

Thanks!