added implementation for hide()