initialize variable outside of switch.