adds hide and show methods to view