simplify tab code