added listener to the whole tab