function after add tab to