moved hide/show view logic to BaseView