adds debug code to show some variables