merge in place