add crf log conditional selection function
add crf log conditional selection function