more sustainable tab function