added Debug()
added debug  code