AC solution to p1007