Wouldn't a `switch` better fit here ?