adding event listener for hide-change