onShow and onHide implemented