changed all switch statements to char