added switch statements