add debug code and new instructions