Put in a switch statement to handle option selections. Also added check if invalid option value is entered.