FFO vs NI vs NOI

In Alternative Investments, the following formula is given for FFO :

FFO = NI + Deferred Tax + Depr + Loss - Gain

Can we assume (I kinda figured this out from practice questions) :

NI = NOI - (Deferred Tax - Depr - Loss + Gain ) - SG&A - Interest

Thus => FFO = NOI - SG&A - Interest

Please let me know if this is correct and if there is any assumptions I have should take in account. Also, do we add the tax shield on Interest ?

Thanks !