Reworked my switch statement