better debug code