explicit variable passing to defer - to be removed.