added back debugging code left for analysis