add mask to finalizer