made tab converter a function