functional merge