removed "debug" facility as not used
eventually replace with unit tests