added debug output which displays raw structures