added function do_concatenate