added: wrote out this exercise in if/elseif format to appreciate the switch function