change var  to  and unset when finish