persisting and updating variables