add update hook for change in  variables