fix tabs example
more refactoring