added an update function for analyzer