Adding functionality to all tabs