Adds update function to update sud at (x,y) with z.