add debug code to traivs