can not change value in inner func