changed $circuit? to $circuit, and changed $all-different? to $distinct