add comment; add debug code in debug(), allow initial default for $debug