added back in debugging statements as I try to get matching for nested elements working correctly again