created switchcase() and parse_case() to handle parsing switch