added switch statement instead