fix #2: clear debug output and revised #1