move visibility logic from view to toggle visibility view helper method