Update FlipTabs

rearranging functions