added debugger code