turned switch statements into if, else if, else statements