refactor tuple_cat