Could use `switch` and define the levels as string constants.