change switch statments with strings to if-else to get it to build in my
environ