fix the cv criteria function