add debug code as comments.