add some debug code