free variable calculation and naive closure creation works