cat_merge.cpp update