smart merge