simplified case-checking