optimization: fast controls on the merge function