Correct solution to 2-SAT