High idle

2003 chev. cavalier, 2.2, auto., Idle is normal without a/c (800 rpms) Turn on a/c, idle goes up to 1200 rpms briefly. After it is warmed up and a/c is turned on the rpms go up to 2,500-3,000 rpms. If the a/c is turned off, the rpms will go do to 1,500-2,000 rpms. Rpms will not return to normal until a/c is on and engine is off and restsrted. My OBD2 code reader read P0507 idle system-rpms higher than expected and another mechanics scanner read idle air control valve. Several other people told me to replace the iac valve. I cancelled the computer codes and installed a new idle air control valve. That didn’t fix the problem. Help?