add tab selected listener