update function mergepass