add function to verify if a solution satisfies all clauses