improve AC-AC detection