added the function to show the active tab