added debugging code
added debugging code