adding more debugging code