initial commit - converted previous if/else statement to switch statement