move debug code