refine case syntax