reordered switch cases in sequence