Now uses switch-case