Copying and pasting some SAT code.