implement switch statements