added switch statement to convert name to number