debug & optimize code diff