add some extra debugging code