replaced var.inner with all.vars