finished ex 13 with switch statements