new logic for show/hide