some if else tab's clean up