updated assignment with switch.