refactor tuple and type_tuple