deleted redundant switch statement