rewrite 2sat