Small detail: you could have used the `fallthrough` keyword instead of duplicating code.