why the intermediate variable?