You need to take it to a repair shop and it needs a computer diagnostic. Based on the results the shop will be able to tell you what is the problem and give you an estimate for the repair.
Zee
RepairPal Certified shops can diagnose and repair your 2004 Kia Rio. They provide transparent pricing with a minimum 12-month or 12,000-mile warranty on repairs and services.