Add trigger update function