Merge the update fucntions.