smart debug output added
fix tb interface
tests added
fix last commit