added thinking debug output