improved f8 debug code