mod: reorder cases to boost performance