Update solution (more straightforward). Discard 'enum' + 'switch-case' solution.