add update function for goals