added pseudo logic for switch / case