fragment switch statement now working