more debugging, added debugging code