moving some debug code