add sanity check for which.min2 and test case