convert list of tuples into a string