variable wasn't being instantiated on every update