add finalize and sign_off as functions