created fragment classes and added them to switch statement