created functionality for content switcher