Tentative Gain vs Excess gain on sale Lease backs (confused)

Hello everyone, I'm confused on what gets deferred on sale leasebacks. Becker gives the following formula: Sale price -asset NBV -------------- Tentative gain -PV of min leaseback payments -------------- Excess gain Then on the examples they either defer part of the tentative gain or recognize the entire tentative gain depending on a percentage (I understand the % part). So I'm asking myself what the purpose of the excess gain is. Am I understanding this incorrectly? Any feedback helps thanks