variable updating