add more debugging code