deleted redundant switch statements