Replaced series of assoc with merge