Working on written sample switching based on selected tab