add update functions to classes