inject debug code
refactor