complete rewrite of tabs