added to refactor Erik's code
comments and refactoring of tab/backtab code