add function for finding minimal SAT solution