stop using gate and use finalizer instead