detect AC example