Completed pseudo code SAT to 3SAT